<?php
include_once (SYSTEM.'/Controller.php');
include_once (MODEL . '/ProfileRepository.php');
include_once (MODEL . '/OfferRepository.php');
include_once (MODEL . '/ExchangeRepository.php');
include_once (MODEL . '/WantRepository.php');

class HomeController extends Controller
{
	public function Index()
	{
		$this->ViewData['Title'] = 'MiGi-homepage';
		$ByRank = new ProfileRepository();
		$Want = new WantRepository();
		$Stuff = new OfferRepository();
		$listEx = new ExchangeRepository();
		$model['rank'] = $ByRank->SelectByRank();
		$model['stuff'] = $Stuff->LastestStuff();
		$model['listEx'] = $listEx->GetListExchange(4);
		$model['listOffer'] = $Stuff->GetListOffer();
		$model['listRequest'] = $Want->GetListRequest();
		$this->Render('Index','_Master',$model);
	}
}